import { defineStore } from "pinia"
import { computed, ref } from "vue"
import { AllRequest } from "../utils/allRequest"
export default defineStore("store",  () => {
    /* Define composition API */
    const userCount = ref(0);
    const roleCount = ref(0);
    const categoryCount = ref(0);
    const users = computed(async()=>await AllRequest.getUsers());
    const roles = computed(async()=>await AllRequest.getRoles());
    const categories = computed(async()=>await AllRequest.getCategories());
    return { userCount, users,roles,categories,roleCount,categoryCount }
})